<#include "/common/defaultEngine.html"/>
<@pageTheme mark="${config.optimize()?string('true', 'false')}">
<@header title="新增报销" bodyClass="white-bg" libs=["prism","bootstrapSelect","ueditor"]/>
<div class="wrapper wrapper-content ibox-content">
    <@form.form id="form-reimburse-add"  class="form-horizontal">
    <input  type="hidden" name="userId" value="${user.id}">
    <input  type="hidden" name="modelKey" value="${bpmTaskFrom.modelKey}">
    <input name="fromName"  value="${bpmTaskFrom.fromName}" type="hidden">
    <input name="taskId" value="${taskEntity.taskId}" type="hidden">
    <input name="processInstanceId" value="${taskEntity.processInstanceId}" type="hidden">
    <input name="saleUserid" value="${user.id}" type="text"  type="hidden" >
    <div class="form-group">        <label class="col-sm-3 control-label"><@ctx.i18n text = "销售员"/>：
       </label>
        <div class="col-sm-8"><input name="saleUserName" value="${user.name}" class="form-control" type="text" readonly="true" >
        </div>
     </div>
    <div class="form-group">        <label class="col-sm-3 control-label"><@ctx.i18n text = "销售订单编号"/>：
       </label>
        <div class="col-sm-8"><input name="saleOrderNumber" value="${saleCode}" class="form-control" type="text" readonly="true" >
        </div>
     </div>
    <div class="form-group">        <label class="col-sm-3 control-label"><@ctx.i18n text = "车辆识别号"/>：
       </label>
        <div class="col-sm-8"><input name="outCarVin" class="form-control" value="未知" type="text" readonly="true">
        </div>
     </div>
    <div class="form-group">        <label class="col-sm-3 control-label"><@ctx.i18n text = "车型"/>：
       </label>
        <div class="col-sm-8"><input name="outCarVehicle" class="form-control" value="未知" type="text" readonly="true">
        </div>
     </div>
    <div class="form-group">
        <label class="col-sm-3 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "费用发生日期"/>：</label>
        <div class="col-sm-8">
            <div class="input-group date">
                <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                <input class="form-control time-input" name="reimburseTime"  data-type="date" data-format="yyyy-MM-dd" type="text"  required/>
            </div>
        </div>
    </div>
    <div class="form-group">        <label class="col-sm-3 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "报销金额"/>：
       </label>
        <div class="col-sm-8"><input name="reimburseAmount" class="form-control" type="text"  required>
        </div>
     </div>
    <div class="form-group">        <label class="col-sm-3 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "凭证"/>：
       </label>
        <div class="col-sm-8"><input name="reimburseAttaFilepath" class="form-control" type="text"  required>
        </div>
     </div>
    <div class="form-group">        <label class="col-sm-3 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "备注"/>：
    </label>
        <div class="col-sm-8"><textarea name="reimburseRemark" class="form-control" required></textarea>
        </div>
    </div>
    <div class="form-group">        <label class="col-sm-3 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "审批金额"/>：
       </label>
        <div class="col-sm-8"><input name="cashierAmount" class="form-control" type="text"  required>
        </div>
     </div>
    <div class="form-group">
        <label class="col-sm-3 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "出纳审批"/>：</label>
        <div class="col-sm-8">
              <@form.radio name="cashierApproval" dictType="sys_bpm_crm_passorclose" />
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-3 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "出纳备注"/>：</label>
        <div class="col-sm-8">
            <textarea name="cashierRemark" class="form-control" required></textarea>
        </div>
    </div>
               
    <div class="form-group">        <label class="col-sm-3 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "报销比例"/>：
       </label>
        <div class="col-sm-8"><input name="financeProportion" class="form-control" type="text"  required>
        </div>
     </div>
    <div class="form-group">        <label class="col-sm-3 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "报销金额"/>：
       </label>
        <div class="col-sm-8"><input name="financeAmount" class="form-control" type="text"  required>
        </div>
     </div>
    <div class="form-group">
        <label class="col-sm-3 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "财务经理审批"/>：</label>
        <div class="col-sm-8">
              <@form.radio name="financeApproval" dictType="sys_bpm_crm_passorclose" />
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-3 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "财务经理备注"/>：</label>
        <div class="col-sm-8">
            <textarea name="financeRemark" class="form-control" required></textarea>
        </div>
    </div>

</@form.form>
</div>
<@footer>
    <script type="text/javascript">
        var prefix = baseURL + "bpm/reimburse"
        $("#form-reimburse-add").validate({
            focusCleanup: true
        });

        function submitHandler() {
            console.log($('#form-reimburse-add').serialize())
            //opt.warning("流程实例未启动，无法创建此申请单");
            //return;
            if (opt.validate.form()) {
                     opt.operate.save(prefix + "/add", $('#form-reimburse-add').serialize());
            }
        }

</script>
</@footer>
</@pageTheme>